/**
 * 查询商品介绍内容DTO
 */
import OrderByDTO from '@/api/entity/OrderByDTO'

export default class GoodProduceQueryDTO extends OrderByDTO {
  static instance () {
    return new GoodProduceQueryDTO()
  }

  /**
   * 设置id
   * @param {Array<String|Number>} id
   */
  setId (id) {
    if (id) {
      this.id = id
    }
  }

  /**
   * 添加一个id
   * @param {String|Number} id
   */
  addId (id) {
    if (id) {
      if (this.id) {
        this.id.push(id)
      } else {
        this.id = [id]
      }
    }
  }

  /**
   * 店铺编号
   * @param {Array<String|Number>} storeId
   */
  setStoreId (storeId) {
    if (storeId) {
      this.storeId = storeId
    }
  }

  /**
   * 店铺编号
   * @param {String|Number} storeId
   */
  addStoreId (storeId) {
    if (storeId) {
      if (this.storeId) {
        this.storeId.push(storeId)
      } else {
        this.storeId = [storeId]
      }
    }
  }

  /**
   * 商品编号
   * @param {Array<String|Number>} goodId
   */
  setGoodId (goodId) {
    if (goodId) {
      this.goodId = goodId
    }
  }

  /**
   * 商品编号
   * @param {String|Number} goodId
   */
  addGoodId (goodId) {
    if (goodId) {
      if (this.goodId) {
        this.goodId.push(goodId)
      } else {
        this.goodId = [goodId]
      }
    }
  }

  /**
   * 商品介绍内容类型
   * @param {Array<String|Number>} contentType
   */
  setContentType (contentType) {
    if (contentType) {
      this.goodId = contentType
    }
  }

  /**
   * 商品介绍内容类型
   * @param {String|Number} contentType
   */
  addContentType (contentType) {
    if (contentType) {
      if (this.contentType) {
        this.contentType.push(contentType)
      } else {
        this.contentType = [contentType]
      }
    }
  }
}
